<template>
	<view class="bottom-nav-box">
		<view class="bottom-nav-item">
			<view class="bottom-nav-img-box">
				<image :src="homeSrc" class="bottom-nav-img"></image>
			</view>
			<view class="bottom-nav-label">首页</view>
		</view>
		<view class="bottom-nav-rank-item" @tap="$parent.showRank">
			<view class="bottom-nav-img-box">
				<image :src="rankSrc" class="bottom-nav-rank-img"></image>
				<view class="rank-num">13678</view>
			</view>
			<view class="bottom-nav-label">全省排名</view>
		</view>
		<view class="bottom-nav-item" @tap="goUser">
			<view class="bottom-nav-img-box">
				<image :src="mySrc" class="bottom-nav-img"></image>
			</view>
			<view class="bottom-nav-label">我的</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				homeSrc: '../static/images/home.png',
				mySrc: '../static/images/my.png',
				rankSrc: '../static/images/1.png'
			}
		},
		
		methods: {
			goUser() {
				uni.navigateTo({
					url: '/pages/user/user'
				})
			}
		}
	}
</script>

<style>
	.bottom-nav-box {
		position: fixed;
		display: flex;
		justify-content: space-evenly;
		bottom: 0;
		left: 0;
		z-index: 200;
		background-color: #ffffff;
		width: 100%;
		height: 96rpx;
		align-items: center;
	}
	
	.bottom-nav-label {
		font-size: 22rpx;
	}
	
	.bottom-nav-item {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	
	.bottom-nav-rank-item {
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: -84rpx;
	}
	
	.bottom-nav-img {
		width: 46rpx;
		height: 46rpx;
	}
	
	.bottom-nav-rank-img {
		width: 138rpx;
		height: 138rpx;
	}
	
	.bottom-nav-img-box {
		display: flex;
		justify-content: center;
		align-items: center;
	}
	
	.rank-num {
		position: absolute;
		font-size: 40rpx;
	}
</style>
